#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int missingNumber(int* nums, int numsSize) {
    int i = 0;
    int a = 0;
    for (i = 0; i < (numsSize / sizeof(int)) + 1; i++)
    {
        a ^= i;
    }

    for (i = 0; i < (numsSize / sizeof(int)); i++)
    {
        a ^= nums[i];
    }
    return a;
}

int main()
{
    int arr[] = { 3, 0, 1 };
    int ret = missingNumber(arr, sizeof(arr));
    printf("%d ", ret);
	return 0;
}